package com.example.mapper;

import com.example.entity.SchInformation;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface SchInformationRepository extends JpaRepository<SchInformation, Integer> {
    @Query("SELECT s FROM SchInformation s JOIN SchLine l ON s.schoolName = l.school WHERE l.schClass = :schClass AND s.schoolProject = :schoolProject")
    List<SchInformation> findByClassAndProject(String schClass, String schoolProject);
}

